package com.firefly.web.controller.home;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import java.util.HashMap;
import java.util.Map;


@Controller
public class HomeController {
    @GetMapping("/")
    public String index(Map<String, Object> responseMap) {
        responseMap.put("title", "萤火科技");
        responseMap.put("desc", "萤火科技欢迎你！");
        Map author = new HashMap<>();
        author.put("name","李志刚");
        author.put("email","854378082@qq.com");
        responseMap.put("author", author);
        return "index";
    }
    @GetMapping("/401")
    public Object errors() throws Exception {
        throw new Exception("401");
    }
}
